class: center, middle, inverse, title-slide # Lecture 16 ## Correlation and Linear Regression ### Psych 10 C ### University of California, Irvine ### 05/06/2022 --- ## Correlation - Up to this point we have looked at problems with a single dependent variable, however, we could have more than one. -- - When we have 2 dependent variables we could ask ourselves, how are those two variables related? -- - The correlation between two variables is a measure of the association between them. -- - Formally, it's a measure of how the two variables change together. For example, what happens to the values of one variable as the second one increases? -- - The correlation coefficient measures this degree of association and we denote this value with `\(R\)`. --- ## Correlation - The correlation coefficient can take positive or negative values or it can be 0. -- - However, it will always be bounded between -1 and 1, for example: .pull-left[ <img src="data:image/png;base64,#lec-16_files/figure-html/cor-1-1.png" style="display: block; margin: auto;" /> ] .pull-right[ <img src="data:image/png;base64,#lec-16_files/figure-html/cor-2-1.png" style="display: block; margin: auto;" /> ] --- ## Correlation - A correlation of 0 should look like this: <img src="data:image/png;base64,#lec-16_files/figure-html/cor-0-1.png" style="display: block; margin: auto;" /> --- ## Correlation - Therefore, the sign of the correlation indicates whether one variable **increases** as the otherone **increases** (**positive R**) or if one variable **decreases** as the other one **increases** (**negative R**). -- - On the other hand, the magnitud of R indicates the "strength" of the association, with values closer to 1 (or -1) representing a stronger association between the variables.